// 所有和【用户】相关的请求

import { httpDelete, httpGet, httpPost, httpPut } from "@/utils/http"

export type UserItemType = {
    name: string,
    phone: string,
    password: string,
    confirmPassword: string,
    gradeId: string,
    groupId: string
}

// 获取用户数据
export const findUserApi = (data?: object) => {
    return httpPost('/user/find', data)
}
// 添加用户数据
export const addUserApi = (data: object) => {
    return httpPost('/user/add', data)
}
// 删除用户数据
export const deleteUserApi = (data: object) => {
    return httpDelete('/user/remove', data)
}
// 修改用户数据
export const updateUserApi = (data: object) => {
    return httpPut('/user/update', data)
}
// 获取一个用户数据的详情
export const getUserByIdApi = (data: object) => {
    return httpGet('/user/getById', data)
}